<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>转盘</title>
</head>
<body>


<script>
    function draw() {


        var c=document.getElementById("myCanvas");
        var ctx=c.getContext("2d");
        var deg=Math.PI/180;
        ctx.arc(150,150,150,0,2*Math.PI);
        ctx.stroke();
        ctx.translate(150,150);
        var strs=new Array("1","2","3",
            "1","2","3",
            "1","2","3",
        "1","2","3");
        var angeL=360/12*Math.PI/180;
        for(var i=0;i<strs.length;i++){
            ctx.font="20px Arial";
            ctx.fillText(str[i],30,5);
            ctx.rotate(angeL);

        }
    }
</script>
<canvas id="myCanvas" width="600" height="400" style="border:1px solid #d3d3d3;">
</canvas>
<p><button type="button" onclick="draw();">绘图</button></p>
</body>
</html>